use chrono::DateTime;
use chrono::Local;
use serde::Deserialize;
use serde::Serialize;

pub mod stock_intraday_pankou;
pub mod stock_intraday_transaction;
pub mod stock_kline;
pub mod stock_rpt_f10_basic_org_info;
pub mod stock_rpt_f10_basic_org_issue;
pub mod stock_rpt_f10_finance_bbalance;
pub mod stock_rpt_f10_finance_bcashflow;
pub mod stock_rpt_f10_finance_bcashflowqc;
pub mod stock_rpt_f10_finance_bincome;
pub mod stock_rpt_f10_finance_bincomeqc;
pub mod stock_rpt_f10_finance_bration;
pub mod stock_rpt_f10_finance_brationq;
pub mod stock_rpt_f10_finance_dupont;
pub mod stock_rpt_hsf10_res_predictdetail;
pub mod stocks_board;
pub mod stocks_rpt_f10_eh_freeholders;

pub mod stock_rpt_f10_finance_gbalance; 

#[derive(Debug, Serialize, Deserialize, Clone, Default)]
/// Refer to
pub struct EastmoneyTick {
    /// intraday trade time, 成交时间
    /// every 3 seconds for free level 1
   pub time: DateTime<Local>,
    /// trade price 成交价格
   pub  price: f64,
    /// trade volume 交易量
   pub  volume: u32,
    /// trade num 交易笔数
   pub  trade_count: u32,
    /// 主卖s1， 主买2，j竞价4
   pub s1b2j4: u32,
}

pub fn add_two_numbers(a: i32, b: i32) -> i32 {
    a + b
}

#[cfg(test)]
mod test {
    use super::*;

    #[tokio::test]
    async fn adds_two_positive_numbers() {
        let result = add_two_numbers(2, 3);
        assert_eq!(result, 5);
    }

    #[tokio::test]
    async fn adds_two_negative_numbers() {
        let result = add_two_numbers(-2, -3);
        assert_eq!(result, -5);
    }

    #[tokio::test]
    async fn adds_positive_and_negative_number() {
        let result = add_two_numbers(2, -3);
        assert_eq!(result, -1);
    }
}
